#ifndef _MISC_IOCTL_H_
#define _MISC_IOCTL_H_
#include "error_code.h"

#define MISC_DEV_NAME "misc_device"
#define MISC_DEV_PATH "/dev/misc_device"

#define MISC_IOC_MAGIC 0x97
#define MISC_DATA_LENGTH 1024

typedef struct tag_misc_ioctl_data ioctl_data_t;

#define MISC_IOCTL_CMD _IOWR(MISC_IOC_MAGIC, 0x10, ioctl_data_t)

struct tag_misc_ioctl_data {
    unsigned int cmd;
    unsigned int status;
    unsigned int data_len;
    char data[MISC_DATA_LENGTH];
};

enum tag_misc_cmd {
    MISC_CMD_START = 0,
    MISC_CMD_STOP,
    MISC_CMD_GET,
    MISC_CMD_SET,
    MISC_CMD_ATTACH,
    MISC_CMD_DETACH
};


#endif
